<?php

class dataBase {

	var $host = "localhost";
	var $login ="root";
	var $password = "root";
	var $base = "catalogue";
	
	function dataBase()
	{
	}

	function selectProduct() 
	{
		$connect = mysql_connect($this->host,$this->login,$this->password) or die("Pas de connection au serveur");
		mysql_select_db($this->base,$connect) or die ("Pas de connection &agrave; la base"); 
		
		$selectProduct = 'SELECT id,nom FROM produit';
		$resultSelectProduct = mysql_query($selectProduct);

		
		while($row = mysql_fetch_array($resultSelectProduct))
		{
			$tableau[] = $row;
		}
		return $tableau;
	}

}

?>